package com.wicket.okrapp.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wicket.okrapp.base.service.MOmsAchievementDockingService;
import com.wicket.okrapp.base.service.dto.req.*;
import com.wicket.okrapp.common.dto.FieldInfo;
import com.wicket.okrapp.common.exception.BizException;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import com.wicket.okrapp.dal.mapper.mbg.OmsAchievementDockingMapper;
import com.wicket.okrapp.dal.po.mbg.OmsAchievementDocking;

import java.util.*;
import java.util.ArrayList;
//import com.wicket.okrapp.base.service.dto.res.*;

import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ：
 * @since 2022/1/19 15:39
 *
 *
 * @version 1.0
 */
@Service
public class MOmsAchievementDockingServiceImpl
  extends ServiceImpl<OmsAchievementDockingMapper, OmsAchievementDocking>
  implements MOmsAchievementDockingService {

  @Autowired
  OmsAchievementDockingMapper omsAchievementDockingMapper;
/**
   * 3-10-08查询对接成果关系列表[9134]
   * gen by moon at 4/24/2024, 3:46:59 PM
   */
 @Trace(operationName = "3-10-08查询对接成果关系列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  queryAchievementDockingList(QueryAchievementDockingListReq reqDto) {
     
        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("create_time");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08查询成果对接关系列表[9255]
   * gen by moon at 4/4/2024, 10:03:38 AM
   */
 @Trace(operationName = "3-10-08查询成果对接关系列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  queryAchievementDockList(QueryAchievementDockListReq reqDto) {
     
        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();
            
            
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果关系by一级指标[9271]
   * gen by moon at 4/5/2024, 8:58:46 PM
   */
 @Trace(operationName = "3-10-08批量查询对接成果关系by一级指标")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchievementDockingByRootObjectiveId(BatchQueryAchievementDockingByRootObjectiveIdReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("root_objective_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果列表By子周期ID[9281]
   * gen by moon at 4/5/2024, 8:58:49 PM
   */
 @Trace(operationName = "3-10-08批量查询对接成果列表By子周期ID")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryDockAchievementListBySubCycle(BatchQueryDockAchievementListBySubCycleReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getEvaObjTargetCycleList()==null || reqDto.getEvaObjTargetCycleList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("cycle_id", reqDto.getEvaObjTargetCycleList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            
            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08新增对接成果关系[9132]
   * gen by moon at 4/6/2024, 11:08:20 AM
   */
 @Trace(operationName = "3-10-08新增对接成果关系")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  String  addAchievementDocking(OmsAchievementDocking omsAchievementDocking) {
     omsAchievementDocking.setAchievementDockingId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID
omsAchievementDocking.setIsArchive("FALSE");
omsAchievementDocking.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsAchievementDocking.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
if(omsAchievementDocking!=null && omsAchievementDocking.getSubjectLifeCycle()!=null &&  omsAchievementDocking.getSubjectLifeCycle().equals("CURRENTLY_VALID")) {
            omsAchievementDocking.setReleaseInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//RELEASED_CURRENT_INDUCTIONID
          }
omsAchievementDocking.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
omsAchievementDocking.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
if(omsAchievementDocking!=null && omsAchievementDocking.getSubjectLifeCycle()!=null && omsAchievementDocking.getSubjectLifeCycle().equals("CURRENTLY_VALID")){
             omsAchievementDocking.setReleaseTime(CommonFunctionHelper.getCurrentTime());//RELEASE_SYSTEM_CURRENT_TIME
            }
omsAchievementDocking.setIsValid("FALSE");
     if(super.save(omsAchievementDocking)){
        return omsAchievementDocking.getAchievementDockingId();
     }else {
        return "-1";
     }

  }
/**
   * 3-10-08删除对接成果关系[9133]
   * gen by moon at 4/6/2024, 11:08:21 AM
   */
 @Trace(operationName = "3-10-08删除对接成果关系")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  deleteAchievementDocking(String achievementDockingId ) {

      return super.removeById(achievementDockingId);
  }
/**
   * 3-10-08批量查询对接成果关系By所属主体[9307]
   * gen by moon at 4/6/2024, 11:08:26 AM
   */
 @Trace(operationName = "3-10-08批量查询对接成果关系By所属主体")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchievementDockByBelongBody(BatchQueryAchievementDockByBelongBodyReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("achievement_belong_body_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08查询对接成果关系详情[9312]
   * gen by moon at 4/6/2024, 11:08:29 AM
   */
 @Trace(operationName = "3-10-08查询对接成果关系详情")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  OmsAchievementDocking  queryAchievementDockingDetail(QueryAchievementDockingDetailReq reqDto) {

        try {
         reqDto.setIsValid("FALSE");
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap, new ArrayList<>());
            queryWrapper.orderByDesc("create_time");
            List<OmsAchievementDocking> retList = super.list(queryWrapper);
            if(retList!=null && retList.size()>0){
                OmsAchievementDocking retData = retList.get(0);

                return retData;
            }
            return null;
      } catch (Exception e) {
          e.printStackTrace();
          throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08查询目标内容成果关系列表[9337]
   * gen by moon at 4/7/2024, 8:49:42 AM
   */
 @Trace(operationName = "3-10-08查询目标内容成果关系列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  queryTargetContAchievementDockList(QueryTargetContAchievementDockListReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08查询目标内容成果关系By一级指标列表[9349]
   * gen by moon at 4/7/2024, 8:49:46 AM
   */
 @Trace(operationName = "3-10-08查询目标内容成果关系By一级指标列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  queryTargetContAchievementDockByFirstObjList(QueryTargetContAchievementDockByFirstObjListReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("root_objective_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果关系by归属目标内容ID[9567]
   * gen by moon at 5/13/2024, 2:38:04 AM
   */
 @Trace(operationName = "3-10-08批量查询对接成果关系by归属目标内容ID")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchievementDockingByTargetCycleContentId(BatchQueryAchievementDockingByTargetCycleContentIdReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getAchievementDockList()==null || reqDto.getAchievementDockList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("target_cycle_content_id", reqDto.getAchievementDockList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果关系By评价画像根节点[9652]
   * gen by moon at 5/23/2024, 2:47:41 AM
   */
 @Trace(operationName = "3-10-08批量查询对接成果关系By评价画像根节点")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchDockByEvaPortraitSubRoot(BatchQueryAchDockByEvaPortraitSubRootReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("eva_portrait_target_sub_cycle_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08查询对接成果关系（分页）列表[9920]
   * gen by moon at 7/3/2024, 8:27:40 PM
   */
 @Trace(operationName = "3-10-08查询对接成果关系（分页）列表")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  queryAchievementDockPagingList(QueryAchievementDockPagingListReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();


            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("create_time");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果By子周期周期ID列表（分页）[9922]
   * gen by moon at 7/3/2024, 8:27:43 PM
   */
 @Trace(operationName = "3-10-08批量查询对接成果By子周期周期ID列表（分页）")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryDockAchievementBySubCyclePagingListByIds(BatchQueryDockAchievementBySubCyclePagingListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("cycle_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果By所属主体列表(分页）[9924]
   * gen by moon at 7/3/2024, 8:27:47 PM
   */
 @Trace(operationName = "3-10-08批量查询对接成果By所属主体列表(分页）")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchievementDockByBelongBodyPagingListByIds(BatchQueryAchievementDockByBelongBodyPagingListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("achievement_belong_body_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果By评价画像根节点列表（分页）[9926]
   * gen by moon at 7/3/2024, 8:27:51 PM
   */
 @Trace(operationName = "3-10-08批量查询对接成果By评价画像根节点列表（分页）")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryDockAchievementByEvaPortraitSubRootPagingListByIds(BatchQueryDockAchievementByEvaPortraitSubRootPagingListByIdsReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("eva_portrait_target_sub_cycle_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);
            queryWrapper.orderByDesc("create_time");
queryWrapper.orderByDesc("operate_time");
            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询成果对接by创建人[9976]
   * gen by moon at 7/19/2024, 5:25:18 PM
   */
 @Trace(operationName = "3-10-08批量查询成果对接by创建人")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchievementDockByCreateInductionId(BatchQueryAchievementDockByCreateInductionIdReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();

            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("create_induction_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
/**
   * 3-10-08批量查询对接成果关系by被评对象目标周期ID[10092]
   * gen by moon at 8/12/2024, 8:15:07 PM
   */
 @Trace(operationName = "3-10-08批量查询对接成果关系by被评对象目标周期ID")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  List<OmsAchievementDocking>  batchQueryAchievementDockingByEvaObjTargetCycleId(BatchQueryAchievementDockingByEvaObjTargetCycleIdReq reqDto) {

        try {
            QueryWrapper<OmsAchievementDocking> queryWrapper = new QueryWrapper<>();
            reqDto.setIsValid("FALSE");
            if(reqDto.getAchievementDockingList()==null || reqDto.getAchievementDockingList().isEmpty()){
                    return new ArrayList<>();
                }
        queryWrapper.in("eva_obj_target_cycle_id", reqDto.getAchievementDockingList());
            Map<String, Object> fieldInfoMap = null;
            fieldInfoMap = CommonFunctionHelper.objectToMapForLamBda(reqDto);
            List<FieldInfo> compareList = CommonFunctionHelper.getRangeField(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperCompare(queryWrapper, compareList, fieldInfoMap);
            List<FieldInfo> likeList = CommonFunctionHelper.getLikeFiled(OmsAchievementDocking.class);
            CommonFunctionHelper.buildQueryWrapperLike(queryWrapper,likeList,fieldInfoMap);
            likeList.addAll(compareList);
            CommonFunctionHelper.buildQueryWrapperEq(queryWrapper, fieldInfoMap,likeList);
            List<FieldInfo> orderList = CommonFunctionHelper.getOrderList(OmsAchievementDocking.class);
            //CommonFunctionHelper.buildQueryWrapperOrder(queryWrapper, orderList);

            return ((List<OmsAchievementDocking>) super.list(queryWrapper));
        } catch (Exception e) {
            e.printStackTrace();
            throw new BizException("-1",e,false);
        }
  }
}
